// 部门管理
import request from '@/utils/request'

// 获取部门组织树
export const getDeptTree = (data) => {
  return request({ url: `/xddcloud-psc/psc/dept/tree`, method: 'POST', data })
}

// 新增部门
export const addDept = (data) => {
  return request({ url: `/xddcloud-psc/psc/dept/add`, method: 'POST', data })
}

// 修改部门
export const editDept = (data) => {
  return request({ url: `/xddcloud-psc/psc/dept/edit`, method: 'PUT', data })
}

// 部门列表
export const deptList = (params) => {
  return request({ url: `/xddcloud-psc/psc/dept/list`, method: 'GET', params })
}

// 获取部门详情
export const getDeptDetail = (params) => {
  return request({ url: `/xddcloud-psc/psc/dept/get/${params.deptId}`, method: 'GET' })
}

// 删除部门
export const deleteDept = (params) => {
  return request({ url: `/xddcloud-psc/psc/dept/logicDeleteByDept`, method: 'PUT', params })
}

